package com.xd.cloud.entity.core;

import com.xd.cloud.entity.BaseEntity;
import org.hibernate.annotations.Cascade;

import javax.persistence.*;

/**
 * @author wangtao
 * @class_name UserDataAuthority
 * @description 用户与数据权限
 * @create 2017/12/27
 */
@Entity
@Table(name = "sys_user_data_authority")
public class UserDataAuthority extends BaseEntity {
    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "userid")
    private User user;
    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "dataAuthorityid")
    private DataAuthority dataAuthority;

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public DataAuthority getDataAuthority() {
        return dataAuthority;
    }

    public void setDataAuthority(DataAuthority dataAuthority) {
        this.dataAuthority = dataAuthority;
    }
}
